package com.pasabahceambalaj.session;

import com.pasabahceambalaj.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("ulkeList")
public class UlkeList extends EntityQuery<Ulke> {

	private static final String EJBQL = "select ulke from Ulke ulke";

	private static final String[] RESTRICTIONS = { "lower(ulke.ad) like lower(concat(#{ulkeList.ulke.ad},'%'))", "lower(ulke.kod) like lower(concat(#{ulkeList.ulke.kod},'%'))", };

	private Ulke ulke = new Ulke();

	public UlkeList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Ulke getUlke() {
		return ulke;
	}
}
